<div class="function">
<nz-collapseset>
    <nz-collapse [nzTitle]="panels.name" [nzActive]="panels.active" [nzDisabled]="panels.disabled">
        <form nz-form [nzLayout]="'inline'" >
            <div nz-form-item nz-col [nzSpan]="6">
                <div nz-form-label nz-col [nzSm]="9" [nzXs]="6">
                    <label>权限名称</label>
                </div>
                <div nz-form-control>
                    <nz-input  [(ngModel)]="sysAuthorBean.authorName" name="authorName">
                    </nz-input>
                </div>
            </div>
            <div nz-form-item nz-col [nzSpan]="6">
                <div nz-form-label nz-col [nzSm]="9" [nzXs]="6">
                    <label>所属类型</label>
                </div>
                <div nz-form-control>
                    <nz-select
                            style="width: 150px;"
                            nzAllowClear
                            [nzPlaceHolder]="'请选择'"
                            [(ngModel)]="sysAuthorBean.sysType"
                            [nzShowSearch]="true" name="sysType">
                        <nz-option
                                *ngFor="let option of searchOptions"
                                [nzLabel]="option.label"
                                [nzValue]="option.value"
                                [nzDisabled]="option.disabled">
                        </nz-option>
                    </nz-select>
                </div>
            </div>
            <button nz-button [nzSize]="'large'" [nzType]="'primary'" (click)="query()">查询</button>
        </form>

    </nz-collapse>
</nz-collapseset>
<ul nz-menu [nzMode]="'horizontal'">
    <!-- <li nz-submenu>
        <span title><i class="anticon anticon-setting"></i>操作</span>
        <ul>
            <li nz-menu-group>
                <ul>
                    <li class="operate" nz-menu-item (click)="add(title, content, footer)"><i class="anticon anticon-plus"></i>添加</li>
                    <li class="operate" nz-menu-item (click)="update(title, content, footer)"><i class="anticon anticon-copy"></i>修改</li>
                    <li class="operate" nz-menu-item (click)="delete()"><i class="anticon anticon-delete"></i>删除</li>
                </ul>
            </li>
        </ul>
    </li> -->
    <li  nz-menu-item (click)="add(title, content, footer)"><i class="anticon anticon-plus"></i>添加</li>
    <li  nz-menu-item (click)="update(title, content, footer)"><i class="anticon anticon-copy"></i>修改</li>
   <!-- <li  nz-menu-item (click)="delete()"><i class="anticon anticon-delete"></i>删除</li>-->

</ul>
<nz-table #nzTable [nzDataSource]="list" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="displayDataChange($event)">
    <thead nz-thead>
    <tr>
        <th nz-th [nzCheckbox]="true">
            <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)">
            </label>
        </th>
        <th nz-th><span>所属系统</span></th>
        <th nz-th><span>权限名称</span></th>
        <th nz-th><span>权限描述</span></th>
        <th nz-th><span>图标</span></th>
        <th nz-th><span>地址</span></th>
        <th nz-th><span>上级名称</span></th>
        <th nz-th><span>权限Id</span></th>
        <th nz-th><span>权限类型</span></th>
    </tr>
    </thead>
    <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let data of list">
        <td nz-td [nzCheckbox]="true">
            <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="refreshStatus($event)">
            </label>
        </td>
        <td nz-td>{{data.sysType=='pc'?'电脑端':'手机端'}}</td>
        <td nz-td>{{data.authorName}}</td>
        <td nz-td>{{data.authorDescribe}}</td>
        <td nz-td>
            <i class="anticon anticon-{{data.authorIcon}}"></i>
        </td>
        <td nz-td>{{data.authorUrl}}</td>
        <td nz-td>{{data.parentName || '顶级菜单'}}</td>
        <td nz-td>{{data.authorId}}</td>
        <td nz-td>{{data.authorType=='menu'?'菜单':'功能'}}</td>
    </tr>
    </tbody>
</nz-table>

<nz-pagination [nzPageIndex]="sysAuthorBean.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger (nzPageSizeChange)="nzPageSizeChange($event)" (nzPageIndexChange)="nzPageIndexChange($event)" (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="sysAuthorBean.pageSize"></nz-pagination>

<!--添加页面 -->
<nz-modal [nzVisible]="isAddVisible" [nzTitle]="'添加'" [nzContent]="modalContent" [nzFooter]="false"  [nzConfirmLoading]="isAddConfirmLoading" (nzOnCancel)="handleCancel($event)">
    <ng-template #modalContent>
        <function-add-page [inValue]="list" (outPut)="addOutPut($event)"></function-add-page>
    </ng-template>
</nz-modal>

<ng-template #title>
  <span>{{modelTitle}}</span>
  </ng-template>
  <ng-template #content>
    <function-add-page *ngIf="modal==0" [inValue]="totalList" (outPut)="addOutPut($event)"></function-add-page>
    <function-modify-page *ngIf="modal==1" [inValue]="updateData" (outPut)="addOutPut($event)"></function-modify-page>
  </ng-template>
  <ng-template #footer>
    <div>
      <!-- <button nz-button [nzType]="'primary'" [nzSize]="'large'" (click)="handleOk($event)" [nzLoading]="isConfirmLoading">
        提 交
      </button> -->
    </div>
  </ng-template>

<!-- 可以使用双模板 -->
<!-- <ng-template #titlem>
    <span>修改</span>
    </ng-template>
    <ng-template #contentm>
        <function-modify-page [inValue]="updateData" (outPut)="addOutPut($event)"></function-modify-page>
    </ng-template>
    <ng-template #footerm>
        <div >
        
        </div>
</ng-template>  -->


</div>
